package sdfi.lee.Entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the change table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="change"
 */

public abstract class BaseChange  implements Serializable {

	public static String REF = "Change";
	public static String PROP_USERID = "userid";
	public static String PROP_COUNT = "count";
	public static String PROP_ID = "id";
	public static String PROP_PLATID = "platid";


	// constructors
	public BaseChange () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseChange (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.Integer count;

	// many to one
	private sdfi.lee.Entity.User userid;
	private sdfi.lee.Entity.Platform platid;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="Id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: count
	 */
	public java.lang.Integer getCount () {
		return count;
	}

	/**
	 * Set the value related to the column: count
	 * @param count the count value
	 */
	public void setCount (java.lang.Integer count) {
		this.count = count;
	}



	/**
	 * Return the value associated with the column: userid
	 */
	public sdfi.lee.Entity.User getUserid () {
		return userid;
	}

	/**
	 * Set the value related to the column: userid
	 * @param userid the userid value
	 */
	public void setUserid (sdfi.lee.Entity.User userid) {
		this.userid = userid;
	}



	/**
	 * Return the value associated with the column: platid
	 */
	public sdfi.lee.Entity.Platform getPlatid () {
		return platid;
	}

	/**
	 * Set the value related to the column: platid
	 * @param platid the platid value
	 */
	public void setPlatid (sdfi.lee.Entity.Platform platid) {
		this.platid = platid;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof sdfi.lee.Entity.Change)) return false;
		else {
			sdfi.lee.Entity.Change change = (sdfi.lee.Entity.Change) obj;
			if (null == this.getId() || null == change.getId()) return false;
			else return (this.getId().equals(change.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}